import request from "@/utils/request";
// 查看实物订单列表
export function orderList(query) {
  return request({
    url: "/cancel/order/supplier/list",
    method: "get",
    params: query,
  });
}
// // 查看详情
export function orderListId(query) {
  return request({
    url: "/cancel/order/supplier/showSupplierOrderDetail",
    method: "get",
    params: query,
  });
}
// 导出
export function residentexportOrder(data) {
  return request({
    url: "/cardMall/admin/v1/order/exportOrder",
    method: "post",
    params: data,
  });
}
// 发货
export function ordership(data, orderId) {
  return request({
    url: "/cancel/order/supplier/" + orderId + "/deliveries",
    method: "post",
    data,
  });
}

//查看详情
export function showOrderDetail(query) {
  return request({
    url: "/cancel/order/showOrderDetail",
    method: "get",
    params: query,
  });
}
//退款
export function refundOrder(data) {
  return request({
    url: "/cancel/order/refundOrder",
    method: "post",
    data,
  });
}
// 查看发货单列表
export function deliveryNoteList(id) {
  return request({
    url: "/cancel/order/supplier/order/" + id,
    method: "get",
  });
}
//查看订单待发货商品列表
export function pendingDeliveryGoods(id) {
  return request({
    url: `/cancel/order/supplier/${id}/pendingDeliveryGoods`,
    method: "get",
  });
}
// 提交发货单
export function submitSupplier(id, data) {
  return request({
    url: `/cancel/order/supplier/${id}/submit`,
    method: "put",
    data,
  });
}
//查看发货详情
export function detailSupplier(id) {
  return request({
    url: `/cancel/order/supplier/${id}`,
    method: "get",
  });
}
